package com.entity.pojo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 *
 * </p>
 *
 * @author chenmo
 * @since 2022-04-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
//@Accessors 会与easyExcel冲突导致读取不到Excel中的内容，只能使用@Getter和@Setter代替
//@Accessors(chain = true)
@Getter
@Setter
@ApiModel(value = "Courses对象", description = "")
public class Courses implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "课程id")
    @TableId(value = "courseId", type = IdType.AUTO)
    @ExcelIgnore
    private Integer courseId;

    @ApiModelProperty(value = "课程名称")
    @TableField("courseName")
    @ColumnWidth(20)
    @ExcelProperty(value = "课程名称")
    private String courseName;

    @ApiModelProperty(value = "课程代码")
    @TableField("courseCode")
    @ExcelIgnore
    private String courseCode;

    @ApiModelProperty(value = "后继课程名称字符串，以冒号分隔，实际关系存在课程关系表中")
    @TableField("nextCourseStr")
    @ColumnWidth(30)
    @ExcelProperty(value = "后继课程列表")
    private String nextCourseStr;

    @ApiModelProperty(value = "属性键")
    @TableField("propertiesKey")
    @ColumnWidth(10)
    @ExcelProperty(value = "属性键")
    private String propertiesKey;

    @ApiModelProperty(value = "属性值")
    @TableField("propertiesValue")
    @ColumnWidth(10)
    @ExcelProperty(value = "属性值")
    private String propertiesValue;

    @ApiModelProperty(value = "创建人工号")
    @TableField("createdBy")
    @ExcelIgnore
    private String createdBy;

    @ApiModelProperty(value = "创建人姓名")
    @TableField("createdByName")
    @ExcelIgnore
    private String createdByName;

    @TableLogic
    @TableField(value = "isDeleted", fill = FieldFill.INSERT)
    @ExcelIgnore
    private Integer isDeleted;

    @TableField(value = "createTime", fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间", example = "2019-01-01 10:10:10")
    @ExcelIgnore
    private Date createTime;

    @TableField(value = "updateTime", fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更改时间", example = "2019-02-01 10:10:10")
    @ExcelIgnore
    private Date updateTime;
}
